<?php 
/**
 * eBay Label Printing Program Visit Time Database Table Class 
 * this is a Db Table Class only for storage, It stores Seller preferred visiting time (In there own Time ZONE) Definations
 * It does not matter right now , however , seller will later be allocate to different server accroding different time zone
 * @package  eBayLabelPrinter
 * @category Models/DbTable
 * @author   Norman Dong <norman.dong@hotmail.com>
 * @version  Initial
 * @copyright LeadCasket.com
 * @link     www.leadcasket.com
 * @license  Commercial
 */
 class Model_DbTable_Assist_Visittime extends Zend_Db_Table_Abstract 
{
	/**
	 * @var string Class Table Name
	 */
	
	protected $_name = 'assist_visit_time'; 
	
	/**
	 * Get visit time 
	 * @param int $idVisitTime
	 * @return array  
	 */	
	public function getVisitTime($idVisitTime){
		$idVisitTime = (int) $idVisitTime;
		$row = $this->fetchRow('`id_visit_time` = '.$idVisitTime);
		if(!$row){
			return false;
		}
		return $row->toArray();		
	}
	/**
	 * Get visit time Name
	 * @param int $idVisitTime
	 * @return string
	 */	
	public function getVisitTimeName($idVisitTime){
		$idVisitTime = (int) $idVisitTime;
		$row = $this->fetchRow('`id_visit_time` = '.$idVisitTime);
		if(!$row){
			return false;
		}
		$arrRow = $row->toArray();		
		return $arrRow['name_visit_time'];
	}
	/**
	 * List visit time Name

	 * @return array Two Dimensional array 
	 */	
	public function listVisitTime(){
		$rows = $this->fetchAll('1');
		return $rows->toArray();
	}	
				
}
?>